home *** CD-ROM | disk | FTP | other *** search
- function onEnterFrame()
- {
- var _loc2_ = _root.getBytesLoaded() / _root.getBytesTotal();
- if(getTimer() >= startTime + 100)
- {
- animDone = true;
- }
- if(Math.ceil(bar._width) >= width && animDone)
- {
- trace("loaded!");
- stopSparks = true;
- delete onEnterFrame;
- gotoAndStop("out");
- play();
- }
- else
- {
- setProgress(_loc2_);
- }
- }
- function fadeOut()
- {
- setProgress(progress);
- this._alpha -= 5;
- if(this._alpha <= -50)
- {
- this._visible = false;
- _parent.play();
- }
- }
- function makeSpark()
- {
- }
- function sparkControl()
- {
- if(!stopSparks)
- {
- this._y += this.grav;
- this._x += this.wind;
- this.grav *= gravity;
- this._alpha -= this.grav;
- this._rotation += this.spin;
- if(this._alpha <= 0)
- {
- this.removeMovieClip();
- }
- }
- else
- {
- this.removeMovieClip();
- }
- }
- function setProgress(p)
- {
- bar._width = (bar._width * 2 + p * width) / 3;
- if(progress != 1)
- {
- makeSpark();
- }
- }
- width = 200;
- i = 0;
- gravity = 1.3;
- animDone = true;
- startTime = getTimer();
- stop();
- if(this._name == "loader_mc")
- {
- myName = _global.language.loadingAssets;
- }
- else
- {
- myName = _global.language.initLevel;
- }
- setProgress(0);
-